<template>
  <el-select v-model="value" @change="change">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    >
    </el-option>
  </el-select>
</template>

<script>
export default {
  name: "Link4",
  data() {
    return {
      options: [
        {
          value: "1",
          label: "办公室",
          link: "https://www.sdwcvc.edu.cn/bgs/",
        },
        {
          value: "2",
          label: "组织人事处",
          link: "https://www.sdwcvc.edu.cn/zzrsc/",
        },
        {
          value: "3",
          label: "教务与科研处",
          link: "https://www.sdwcvc.edu.cn/jwkyc/",
        },
        {
          value: "4",
          label: "学生工作处团委",
          link: "https://www.sdwcvc.edu.cn/xsgzc/",
        },
        {
          value: "5",
          label: "成人教育处",
          link: "https://www.sdwcvc.edu.cn/crjy/",
        },
        {
          value: "6",
          label: "招生就业处",
          link: "https://www.sdwcvc.edu.cn/zs/",
        },
        {
          value: "7",
          label: "工会",
          link: "https://www.sdwcvc.edu.cn/gh/",
        },
        {
          value: "8",
          label: "实训中心",
          link: "https://www.sdwcvc.edu.cn/sxzx/",
        },
        {
          value: "9",
          label: "财务审计处",
          link: "http://www.sdwcvc.edu.cn/cwsjc/",
        },
        {
          value: "10",
          label: "图书馆",
          link: "https://www.sdwcvc.edu.cn/tsg/",
        },
      ],
      value: "- - - - -部门站点- - - - -",
    };
  },
  methods: {
    change(value) {
      let obj = {};
      obj = this.options.find((item) => {
        return item.value === value;
      });
      this.value = obj.label;
      window.location.href = obj.link;
    },
  },
};
</script>
